#!/usr/bin/env python3
# filename: custom_vaidatot.py

import re

from wtforms import ValidationError


def custom_email(form_object, field_object):
    """Define custom_email validator"""

    if not re.match(r"[^@+@[^@]+\.[^[@]]+", field_object.data):
        raise ValidationError('Filed must be a valid email address.')
